/**
 * Copyright © 2018 sdjictec.Co.Ltd. All rights reserved.
 **/
package com.sdjictec.haier.config;

import com.sdjictec.haier.utils.LoadPropertiesFile;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Properties;

public class ProFileConfig {

    private static Logger log = LoggerFactory.getLogger(ProFileConfig.class);

    public static String kafka_servers = "";
    public static String kafka_group_id = "";
    public static String kafka_topic = "";


    public static String driver = "";
    public static String jdbcurl = "";
    public static String username = "";
    public static String password = "";


    public static String seconddriver = "";
    public static String secondjdbcurl = "";
    public static String secondusername = "";
    public static String secondpassword = "";


    public static String realtimeFlagFilter = "";

    public static String confhome = "";


    static {
        Properties prop = LoadPropertiesFile.loadPropertiesFile("/kafka2ora.properties");
        try {
//            properties.load(in);
            kafka_servers = prop.getProperty("kafka_servers");
            System.out.println("kafka_servers:" + kafka_servers);
            kafka_group_id = prop.getProperty("kafka_group_id");
            System.out.println("kafka_group_id:" + kafka_group_id);
            kafka_topic = prop.getProperty("kafka_topic");
            System.out.println("kafka_topic:" + kafka_topic);


            driver = prop.getProperty("driver");
            System.out.println("driver:" + driver);
            jdbcurl = prop.getProperty("jdbcurl");
            System.out.println("jdbcurl:" + jdbcurl);
            username = prop.getProperty("username");
            System.out.println("username:" + username);
            password = prop.getProperty("password");
            System.out.println("password:" + password);


            seconddriver = prop.getProperty("seconddriver");
            System.out.println("seconddriver:" + seconddriver);
            secondjdbcurl = prop.getProperty("secondjdbcurl");
            System.out.println("secondjdbcurl:" + secondjdbcurl);
            secondusername = prop.getProperty("secondusername");
            System.out.println("secondusername:" + secondusername);
            secondpassword = prop.getProperty("secondpassword");
            System.out.println("secondpassword:" + secondpassword);


            realtimeFlagFilter = prop.getProperty("realtimeFlagFilter");
            System.out.println("realtimeFlagFilter:" + realtimeFlagFilter);


            confhome = prop.getProperty("confhome");
            System.out.println("confhome:" + confhome);


        } catch (Exception e) {
            log.error("获取配置失败");
        }
    }

}
